<template>
    <div class="container-wrap">
        <img :src="successImg" class="img"/>
        <p style="font-size:40rpx;">您的新手机号，已更换成功</p>
        <p><span style="color:red;">{{time}}s</span>后页面将自动跳转至"我的"页面</p>
        <van-toast id="van-toast" />
    </div>
</template>

<script>
    export default {
        name: 'my/changePassword',
        data () {
            return {
                time:6,
                successImg: `${process.env.PUBLICIIMGURL}base/success.png`,
            }
        },
        methods: {
            timer () {
                if (this.time > 0) {
                    this.time--
                    setTimeout(this.timer, 1000)
                }
            },
        },
        mounted () {
            this.timer()
            setTimeout(()=>{
                wx.switchTab({url:'/pages/my/index'})
            },6000)
        },
    }
</script>

<style lang="less" scoped>
    page {
        height: 100%;
        width: 100%;
    }
    .container-wrap{
        width:100%;
        height:100%;
        display:flex;
        flex-direction:column;
        align-items: center;
        .img{
            width:240rpx;
            height:240rpx;
            margin:200rpx 0 100rpx;
        }
        p{
            text-align:center;
            margin:0 50rpx 50rpx 40rpx;
            font-size:24rpx;
        }
        .button{
            width:322rpx;
            height:76rpx;
            line-height:76rpx;
            margin-top:100rpx;
            font-size:36rpx;
            border-radius:0px;
            color:#FFF;
            background:#ff9900;
        }

    }


</style>
